Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary RBAC rule for mpijobs-admin*** #630

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vishvajit79
Copy link

@vishvajit79 vishvajit79 commented Mar 26, 2024

Update cluster-role.yaml to remove the unnecessary RBAC rule for mpijobs-admin.

Hello,

Thank you for reviewing this PR. I have removed the line rbac.authorization.kubeflow.org/aggregate-to-kubeflow-mpijobs-admin: "true" from the clusterrole as it was overriding the kubeflow-mpijobs-admin role with the kubeflow-mpijobs-edit role.

To clarify, the rbac.authorization.kubeflow.org/aggregate-to-kubeflow-mpijobs-admin annotation is used to aggregate the kubeflow-mpijobs-admin role to the kubeflow-mpijobs namespace. However, the previous implementation of this annotation was overriding the kubeflow-mpijobs-admin role with the kubeflow-mpijobs-edit role, which is more restrictive.

By removing this line, we are restoring the intended behavior of the kubeflow-mpijobs-admin role, allowing users with this role to manage MPI jobs in the kubeflow-mpijobs namespace.

Thank you for your attention to this matter.

Copy link

google-cla bot commented Mar 26, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign alculquicondor for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

***Update cluster-role.yaml to remove the unnecessary RBAC rule for mpijobs-admin.***

Signed-off-by: Vishvajit Kher <[email protected]>
@vishvajit79 vishvajit79 force-pushed the remove-unnecessary-rbac-annot branch from f5cf739 to b3064b4 Compare March 26, 2024 18:54
@@ -126,7 +126,6 @@ metadata:
name: kubeflow-mpijobs-edit
labels:
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-edit: "true"
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-mpijobs-admin: "true"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove this? An admin might need to perform edits in case of emergencies.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that's the case, then we should define rules for admin. Right now, rules for admin are empty array and when the admin annotation is added to edit clusterrole, it keeps overriding admin role. If we expect the admin to have slightly different role than edit then it would make sense to keep both otherwise I would suggest removing the admin role

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@terrytangyuan @rongou which practices are you following in the training-operator?
I don't have all the context to make a decision here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alculquicondor IIRC, The training-operator doesn't use RBAC aggregations: https://github.com/kubeflow/training-operator/blob/2eff94ea8131879c7175ba6ae9e3d7d098f92f85/manifests/base/rbac/role.yaml

I guess that this setting seems to be only for the MPIJob v2.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but these rules were added before we created the v2. So I'm not really sure what's the context.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense. Actually, I also don't have any context...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any relation to admin rule anywhere in the code. I think it is safe to delete all together but I'd leave that decision to you.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we merge this PR? If not then I will close it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe @johnugeorge has some context of the original intent?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have context either. I wonder if it's for integration with UI or some other front-ends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants